<%@page contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<%
	String path =request.getContextPath();
%>
<head>
    <meta http-equiv="x-ua-compatible" content="ie=7" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <script language="javascript" type="text/javascript">
     
    	function goback(){
	  		var url = "<%=path%>/order/goBack2OrderStatus";
			location.href = url;
	  	}
	  	
    	function orderSave(){
    		form1.action="<%=path%>/order/exeStatusSave";
			form1.submit();
	  	}
	  	
    	function orderCommit(){
    		form1.action= "<%=path%>/order/exeStatusCommit";
    		form1.submit();
	  	}

        function deleteOrderExe(){
            var pkWebOrder=trim("${orderForm13.pkWebOrder}");
            if(pkWebOrder==null || pkWebOrder==""){
				alert("该单据未保存,不需要删除");
				return ;
            }
        	var url = "<%=path%>/order/exeStatusDelete?pkWebOrder=${orderForm13.pkWebOrder}";
			location.href = url;
        }
     </script>
    
</head>
<body class="fullbody">
        <div class="context">
        	<div class="position">
            	<div class="tposi">t当前位置： 
                    	<a href="javascript:changeMenu(1,'<%=path%>/infopub/pubmain?menuid=1');"class="linkstyle">首页</a>&nbsp;&gt;&gt;&nbsp;
                       	 <a href="javascript:changeMenu(3,'');" class="linkstyle">我的订单\合同</a>&nbsp;&gt;&gt;&nbsp; 
                        <span class="curposition">订单执行状态维护</span>
                </div>
            </div>
                <div class="margin8"></div>
                <div class="subpage_bidlist">
                    <div>
                         <div >
		                    <div class="title_index">
		                    	<form name="form1" method="post">
								    <div class="margin20"></div>
								    <div class="subpage_search" >
								    	<input type="hidden" name="pkOrder" value="${orderForm13.pkOrder}" />
								    	<input type="hidden" name="pkWebOrder" value="${orderForm13.pkWebOrder}" />
								    	<input type="hidden" name="pkPurCorp" value="${orderForm13.pkPurCorp}" />
								    	<input type="hidden" name="pkPurDept" value="${orderForm13.pkPurDept}" />
								    	<input type="hidden" name="pkPurPsn" value="${orderForm13.pkPurPsn}" />
								    	<input type="hidden" name="pkSupSendAddr" value="${orderForm13.pkSupSendAddr}" />
								    	<input type="hidden" name="pkInvoiceSupp" value="${orderForm13.pkInvoiceSupp}" />
								    	<input type="hidden" name="pkProtocol" value="${orderForm13.pkProtocol}" />
								    	<input type="hidden" name="ts" value="${orderForm13.ts}" />
				                        <table border="0" cellpadding="0" cellspacing="0" class="searchtable">
				                            <tr>
				                                <td valign="middle" class="w_1">采购订单号：</td>
				                                <td valign="middle" class="w_2">
				                                    <input id="searchtext" name="billNo" type="text" value="${orderForm13.billNo}" readonly="readonly" class="searchtext" />
				                                </td>
				                                <td valign="middle" class="w_1">采购公司：</td>
				                                <td valign="middle" class="w_2">
				                                    <input id="Text1" name="purCorpName" type="text" value="${orderForm13.purCorpName}" readonly="readonly" class="searchtext" />
				                                </td>
				                            </tr>
				                            <tr>
				                            	<td valign="middle" class="w_1">采购部门：</td>
				                                <td valign="middle" class="w_2">
				                                    <input id="searchtext" name="purDeptName" type="text" value="${orderForm13.purDeptName}" readonly="readonly" class="searchtext" />
				                                </td>
				                                <td valign="middle" class="w_1">采购员：</td>
				                                <td valign="middle" class="w_2">
				                                   <input id="searchtext" name="purPsnName" type="text" value="${orderForm13.purPsnName}" readonly="readonly" class="searchtext" />
				                                </td>
				                            </tr>
				                            <tr>
				                                <td valign="middle" class="w_1">订单日期：</td>
				                                <td valign="middle" class="w_2">
				                                    <input id="Text8" name="ordeDate" type="text" value="${orderForm13.ordeDate}" readonly="readonly" class="searchtext"/>
				                                </td>
				                                <td valign="middle" class="w_1">供应商发货地址：</td>
				                                <td valign="middle" class="w_2">
				                                    <input id="Text8" name="supSendAddrName" type="text" value="${orderForm13.supSendAddrName}" readonly="readonly" class="searchtext" />
				                                </td>
				                            </tr>
				                            <tr>
				                                <td valign="middle" class="w_1">发票方：</td>
				                                <td valign="middle" class="w_2">
				                                    <input id="Text8" name="invoiceSuppName" type="text" value="${orderForm13.invoiceSuppName}" readonly="readonly" class="searchtext" />
				                                </td>
				                                <td valign="middle" class="w_1">收付款协议名称：</td>
				                                <td valign="middle" class="w_2">
				                                    <input id="Text8" name="protocolName" type="text" value="${orderForm13.protocolName}" readonly="readonly" class="searchtext" />
				                                </td>
				                            </tr>
				                            <tr>
				                                <td valign="middle" class="w_1">备注：</td>
				                                <td valign="middle" class="w_2">
				                                    <input id="Text8" name="memo" type="text" value="${orderForm13.memo}" readonly="readonly" class="searchtext" />
				                                </td>
												<td></td>
												<td></td>
				                            </tr>
				                            <tr><td colspan="4">&nbsp;</td></tr>
				                        </table>
	                    			</div>
				                    <div class="margin20"></div>
								    <div>
								    	<form name="form1" action="<%=path%>/order/exeStatusCommit" method="post">
									        <table class="tableCss" cellpadding="0" cellspacing="0">
									            <tr class="titleTr">
									                <th width="250px">产品名称 </th>
									                <th width="88px">数量</th>
									                <th width="150px">价格</th>
									                <th width="152px">金额</th>
									                <th width="85px">计划到货日期</th>
									                <th width="75px" class="th1">产品状态</th>
									            </tr>
										        <c:if test="${orderForm13!=null && orderForm13.orderItems!=null}">
													<c:forEach items="${orderForm13.orderItems}" var="orderItemForm" varStatus="index">
														<c:if test="${orderItemForm.index%2==1}">
															<tr align="left" class="contTr-old" >
														</c:if>
														<c:if test="${orderItemForm.index%2==0}">
															<tr align="left" class="contTr-even">
														</c:if>
															<td class="td3">
																<input type="hidden" name="pkItemOrder" value="${orderItemForm.pkItemOrder}" />
																<input type="hidden" name="pkWebItemOrder" value="${orderItemForm.pkWebItemOrder}" />
																<input type="hidden" name="contractNo" value="${orderItemForm.contractNo}" />
																<input type="hidden" name="pkProd" value="${orderItemForm.pkProd}" />
																<input type="hidden" name="prodName" value="${orderItemForm.prodName}" />
																<input type="hidden" name="module" value="${orderItemForm.module}" />
																<input type="hidden" name="type" value="${orderItemForm.type}" />
																<input type="hidden" name="desc" value="${orderItemForm.desc}" />
																<input type="hidden" name="batchNo" value="${orderItemForm.batchNo}" />
																<input type="hidden" name="pkMeasure" value="${orderItemForm.pkMeasure}" />
																<input type="hidden" name="measureName" value="${orderItemForm.measureName}" />
																<input type="hidden" name="orderNum" value="${orderItemForm.orderNum}" />
																<input type="hidden" name="orderPrice" value="${orderItemForm.orderPrice}" />
																<input type="hidden" name="discount" value="${orderItemForm.discount}" />
																<input type="hidden" name="netTaxPrice" value="${orderItemForm.netTaxPrice}" />
																<input type="hidden" name="taxPrice" value="${orderItemForm.taxPrice}" />
																<input type="hidden" name="priceTaxTotal" value="${orderItemForm.priceTaxTotal}" />
																<input type="hidden" name="rate" value="${orderItemForm.rate}" />
																<input type="hidden" name="taxNum" value="${orderItemForm.taxNum}" />
																<input type="hidden" name="pkCurrency" value="${orderItemForm.pkCurrency}" />
																<input type="hidden" name="curName" value="${orderItemForm.curName}" />
																<input type="hidden" name="planArrDate" value="${orderItemForm.planArrDate}" />
																<input type="hidden" name="pkTransferType" value="${orderItemForm.pkTransferType}" />
<!--																<input type="hidden" name="transferName" value="${orderItemForm.transferName}" />-->
																<input type="hidden" name="pkReceiveAddr" value="${orderItemForm.pkReceiveAddr}" />
																<input type="hidden" name="receiveAddr" value="${orderItemForm.receiveAddr}" />
																<input type="hidden" name="pkProducer" value="${orderItemForm.pkProducer}" />
																<input type="hidden" name="produceFactory" value="${orderItemForm.produceFactory}" />
																<input type="hidden" name="pkQulityLevel" value="${orderItemForm.pkQulityLevel}" />
																<input type="hidden" name="qulityLevel" value="${orderItemForm.qulityLevel}" />
																<input type="hidden" name="prodStatusBeforeCmt" value="${orderItemForm.prodStatusBeforeCmt}" />
																<span class="prodName">${orderItemForm.prodName}</span><br/>
																<c:if test="${orderItemForm.module!=null && ''!=orderItemForm.module}">规格：${orderItemForm.module}<br/></c:if>
																<c:if test="${orderItemForm.type!=null && ''!=orderItemForm.type}">型号：${orderItemForm.type}<br/></c:if>
																<c:if test="${orderItemForm.batchNo!=null && ''!=orderItemForm.batchNo}">批次号：${orderItemForm.batchNo}<br/></c:if>
																<c:if test="${orderItemForm.ct_code!=null && ''!=orderItemForm.ct_code}">合同号：${orderItemForm.ct_code}<br/></c:if>
																<c:if test="${orderItemForm.invcode!=null && ''!=orderItemForm.invcode}">存货编码：${orderItemForm.invcode}<br/></c:if>
																<c:if test="${orderItemForm.def18!=null && ''!=orderItemForm.def18}">主机号：${orderItemForm.def18}<br/></c:if>
																<c:if test="${orderItemForm.graphid!=null && ''!=orderItemForm.graphid}">图号：${orderItemForm.graphid}<br/></c:if>
																<c:if test="${orderItemForm.def20!=null && ''!=orderItemForm.def20}">技术要求：${orderItemForm.def20}<br/></c:if>
																<c:if test="${orderItemForm.arrvcorp!=null && ''!=orderItemForm.arrvcorp}">到货公司：${orderItemForm.arrvcorp}<br/></c:if>
																<c:if test="${orderItemForm.produceFactory!=null && ''!=orderItemForm.produceFactory}">生产厂商：${orderItemForm.produceFactory}<br/></c:if>
																<c:if test="${orderItemForm.qulityLevel!=null && ''!=orderItemForm.qulityLevel}">质量等级：${orderItemForm.qulityLevel}<br/></c:if>
																<c:if test="${orderItemForm.desc!=null && ''!=orderItemForm.desc}">描述：${orderItemForm.desc}</c:if>&nbsp;
															</td>
															<td class="td3"><font class="words-red-bold">${orderItemForm.orderNum}</font>${orderItemForm.measureName}</td>
															<td class="td3">
																含税单价：<font class="words-blue">${orderItemForm.taxPrice}</font><br/>
																折扣率：<font class="words-blue">${orderItemForm.discount}</font><br/>
																净含税单价：<font class="words-blue">${orderItemForm.netTaxPrice}</font><br/>
																币种：<font class="words-blue">${orderItemForm.curName}</font><br/>
															</td>
															<td class="td3">
																税率：<font class="words-blue">${orderItemForm.rate}</font><br/>
																价税合计：<font class="words-red-bold">${orderItemForm.priceTaxTotal}</font>&nbsp;
															</td>
															<td class="td3"><font class="words-blue">${orderItemForm.planArrDate}&nbsp;</font></td>
															<td class="td3">
																<c:if test="${orderForm13.needModifyFlag}">
																	<select class="searchtext"  name="prodStatus">
																		<option value="1" <c:if test="${1==orderItemForm.prodStatus}">selected</c:if>>采购</option>
																		<option value="2" <c:if test="${2==orderItemForm.prodStatus}">selected</c:if>>生产</option>
																		<option value="3" <c:if test="${3==orderItemForm.prodStatus}">selected</c:if>>库存</option>
																		<option value="4" <c:if test="${4==orderItemForm.prodStatus}">selected</c:if>>在途</option>
																		<option value="5" <c:if test="${5==orderItemForm.prodStatus}">selected</c:if>>全部发货</option>
																	</select>
																</c:if>
																<c:if test="${!orderForm13.needModifyFlag}">
																	全部发货
																</c:if>&nbsp;
															</td>
														</tr>
														<c:if test="${orderItemForm.index%2==1}">
														<tr boder='1' class="contTr-old" style="height: 28px">
															</c:if>
															<c:if test="${orderItemForm.index%2==0}">
																<tr boder='1' class="contTr-even" style="height: 28px">
															</c:if>
																<td align="left" colspan="6" class="td2">
																	收货地址：<c:if test="${orderItemForm.receiveAddr!=null && ''!=orderItemForm.receiveAddr}">${orderItemForm.receiveAddr}</c:if>
																		     <c:if test="${orderItemForm.receiveAddr==null || ''==orderItemForm.receiveAddr}">暂无</c:if>
															</td>
														</tr>
													</c:forEach>
												</c:if>
											</table>
										</form>
								    </div>
								</form>
							    <div class="margin20"></div>
							    <div>
							        <table width="600" align="center" border="0" cellspacing="0" cellpadding="0">
							            <tr id="order_confirm" align="center">
							                <td>
												<!-- 所有产品都是全部交货，按钮不显示-->
							                	<c:if test="${orderForm13.needModifyFlag}">
<!--								                    <input type="button" class="btnscs" value="保存" onclick="orderSave()" />-->
<!--								                    &nbsp;&nbsp;&nbsp;&nbsp;-->
								                    <input type="button" class="btnscs" value="提交"  onclick="orderCommit()"/>
								                    &nbsp;&nbsp;&nbsp;&nbsp;
												</c:if>
							                    <input type="button" class="btnscs" value="返回"  onclick="goback()" />
							                </td>
							            </tr>
							        </table>
							    </div>
							</div>
			                <div class="margin20"></div>
						</div>
                    </div>
                    <div class="margin8"></div>
                    <div class="margin8">
                    	<table align="left">
							<tr class="title">
								<td>
									<div id="message" class="msgcolor">${system_err_msg}</div>
								</td>
							</tr>
						</table>
					</div> 
                </div>
            </div>
        <div class="margin20"></div>
</body>
</html>
